home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Utilities / CommentConverter 1.0.0 / Think C 7.0 Project / Sources / Apple.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-09  |  3.7 KB  |  96 lines  |  [TEXT/KAHL]

  1. #ifndef bscoh
  2. #define bscoh
  3. // Alternativ: #pragma once
  4. #ifdef apple
  5. #ifdef modus_mcp
  6.  
  7. #include <ctype.h>
  8. #include <fcntl.h>
  9. #include <float.h>
  10. #include <limits.h>
  11. #include <math.h>
  12. #include <size_t.h>
  13. #include <stat.h>
  14. #include <stdarg.h>
  15. #include <time.h>
  16.  
  17.  
  18.  
  19. #include <string.h>
  20. #include <stdlib.h>
  21. #include <stdio.h>
  22. #include <GestaltEqu.h>
  23. #include <Files.h>
  24. #include <TextEdit.h>
  25. #include <Dialogs.h>
  26. #include <types.h>
  27.  
  28. #ifdef AppleEventsANSI        // In AppleEvents.h werden Files included, die Enumeration Constants
  29. #include <AppleEventsANSI.h>    // Vereinbaren, die nicht als Int durchgehen => Schwierigkeiten mit
  30. #else                 // ANSI-Einstellung Enumeration Constants are always int!
  31. #include <AppleEvents.h>    // Falls AppleEventsANSI definiert ist wird das umgangen, es werden
  32. #endif                // modifizierte Header included (AppleEventsANSI, EPPCANSI und ProcessesANSI)
  33.                 // KEINE GARANTIE FÜR DAS FUNKTIONIEREN DIESER HEADER!!!!!!!!!!!!!!!!!!!!!!!!
  34.  
  35.  
  36.  
  37. /***************************************************************************/
  38. /*****   Include-Datei für SETI: Mac Daten                               *****/
  39. /*****   für MCP und Inter-Modus                                       *****/
  40. /*****   Autor:    Andreas Amoroso                                     *****/
  41. /*****   Datum:    11.8.1993                                           *****/
  42. /***************************************************************************/
  43.  
  44.  
  45. // Resource-IDs for Alerts
  46. // N.B.:
  47. #define rNoPDocAlert    128
  48. #define rCannotOpenFile 129
  49. #define rPathTooLong    130
  50. #define rNoOAppAlert    131        //Ergänzt von Amoroso, 31.8.93, für den Fall das beide Modi doch zusammen gehen!
  51. #define dOKButton      1
  52.  
  53.  
  54. // Limit of Files to open. Change, if necessary!
  55.  
  56. #define maxFiles      8
  57.  
  58.  
  59. //PROTOTYPES: used in this file
  60.  
  61. char **GetProgParams(int *);                    // Retrieves list of files from ODoc-Event and puts it to argv
  62. //void    InitToolbox(void);                        // Installs the Toolbox
  63. static void InitTBandCON(void);                    // Installs the Toolbox compatible with the Console Package
  64. Boolean AppleEventsInstalled (void);            // Tests if AppleEvents available
  65. void testlength(char *);                        // Tests if full pathname is too long
  66. Boolean GetQuitReq(int);                        // Tests if QuitApplication-Event was received
  67. void GetFullPath(long DirID, short vRefNum, StringPtr fullPath);
  68.                                                 // Assembles the full pathname of a file under System-7
  69. void DoError(OSErr);                            // Too complicated to describe!!
  70. int GetFileInfo(char *, unsigned long *, unsigned long *);    
  71.                                                 // Get Type and Creator
  72. int SetFileInfo(char *, unsigned long, unsigned long);    
  73.                                                 // Manipulate Filename, Type and Creator
  74. int GetProgName(char *);                        // Set String with ProgName:Creator
  75.                                                 // ":" Kann auf dem Mac nicht für Dateinamen verwendet werden!!!
  76. int GetStartMods(char *, unsigned short);        // Set String with ":modifiers csaok" if pressed while startup
  77.                                                 // Control,Shift,Alpha Lock,Option,KControl...
  78. int TestStartMods(unsigned short);    
  79. int checkType(FILE *, char *, int *,  int);
  80.                                                 // Test file on being .con or .dat
  81. int swapArgv(char *, char *);                    // Swap two argvs
  82.  
  83.  
  84.  
  85.  
  86. // AppleEvent-Handlers
  87.  
  88. pascal OSErr  MyHandleODoc(AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefCon);    // AppleEvent-Handlers
  89. pascal OSErr  MyHandlePDoc (AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefCon);    // AppleEvent-Handlers
  90. pascal OSErr  MyHandleOApp (AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefCon);    // AppleEvent-Handlers
  91. pascal OSErr  MyHandleQuit (AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefCon);    // AppleEvent-Handlers
  92. OSErr MyGotRequiredParams (AppleEvent *theAppleEvent);                                            // MAC, checks for AE PARAMS 
  93.  
  94. #endif //modus_mcp
  95. #endif //apple
  96. #endif //ifndef bscoh